#include <bits/stdc++.h>
using namespace std;
#define eps 1e-8
#define zero(x) (((x)>0 ? (x):-(x))<eps)
struct point3{
	double x, y, z;
	point3(){}
	point3(int x, int y, int z): x(x), y(y), z(z){}
	void sc(){
		scanf("%lf%lf%lf", &x, &y, &z);
	}
	double dis(point3 b){
		return sqrt(pow(x-b.x,2)+pow(y-b.y,2)+pow(z-b.z,2));
	}
	void pr(){
		printf("(%.3f %.3f %.3f) ", x, y, z);
	}
};
struct line3{
	point3 a, b;
	void pr(){
		a.pr(); b.pr();
		printf("\n");
	}
};
struct plane3{
	point3 a, b, c;
	double s;
	plane3(){}
	plane3(point3 a, point3 b, point3 c): a(a), b(b), c(c){}
	void get(){
		double la = b.dis(c), lb = c.dis(a), lc = a.dis(b);
		double p = (la+lb+lc)/2;
		s = sqrt(p*(p-la)*(p-lb)*(p-lc));
		//	printf("s = %.4f\n", s);
	}
	void pr(){
		a.pr(), b.pr(), c.pr();
		printf("\n");
	}
};
double vlen(point3 p){
	return sqrt(p.x*p.x+p.y*p.y+p.z*p.z);
}
point3 xmult(point3 u, point3 v){
	point3 ret;
	ret.x = u.y*v.z-u.z*v.y;
	ret.y = u.z*v.x-u.x*v.z;
	ret.z = u.x*v.y-u.y*v.x;
	return ret;
}
point3 subt(point3 u, point3 v){
	point3 ret;
	ret.x = u.x-v.x;
	ret.y = u.y-v.y;
	ret.z = u.z-v.z;
	return ret;
}
point3 pvec(plane3 s){
	return xmult(subt(s.a, s.b), subt(s.b, s.c));
}
double dmult(point3 u, point3 v){
	return u.x*v.x + u.y*v.y + u.z*v.z;
}
double ptoplane(point3 p, plane3 s){
	if(zero(vlen(pvec(s)))) return 0;
	return fabs(dmult(pvec(s), subt(p,s.a))/vlen(pvec(s)));
}
int parallel(point3 a, point3 b, plane3 s){
	return zero(dmult(subt(a, b), pvec(s)));
}
point3 intersection(point3 u, point3 v, plane3 s){
	point3 ret = pvec(s);
	double t = (ret.x*(s.a.x-u.x)+ret.y*(s.a.y-u.y)+ret.z*(s.a.z-u.z))/
		(ret.x*(v.x-u.x)+ret.y*(v.y-u.y)+ret.z*(v.z-u.z));
	ret.x = u.x+(v.x-u.x)*t;
	ret.y = u.y+(v.y-u.y)*t;
	ret.z = u.z+(v.z-u.z)*t;
	return ret;
}
line3 intersection(plane3 u, plane3 v){
	line3 ret;
	ret.a = parallel(v.a, v.b, u)
		? intersection(v.b, v.c, u)
		: intersection(v.a, v.b, u);
	ret.b = parallel(v.c, v.a, u)
		? intersection(v.b, v.c, u)
		: intersection(v.c, v.a, u);
	return ret;
}
point3 up(point3 a, double r, point3 v){
	point3 ret;
	ret.x = r*v.x+a.x;
	ret.y = r*v.y+a.y;
	ret.z = r*v.z+a.z;
	return ret;
}
plane3 move(plane3 M, point3 A, double d){
	point3 v = pvec(M);
	double len = vlen(v);
	v.x /= len; v.y /= len; v.z /= len;
	point3 na = up(M.a, d, v);
	if(dmult(v, subt(A, M.a)) * dmult(v, subt(na, M.a)) < -eps)
		d *= -1;
	point3 ta = up(M.a, d, v);
	point3 tb = up(M.b, d, v);
	point3 tc = up(M.c, d, v);
	//printf("d == %.2f\n", d);
	//	v.pr();
	return plane3(ta, tb, tc);
}
point3 gao(line3 u, line3 v){
	//u.pr(); v.pr();
	point3 ret = u.a;
	double un = (u.a.x-u.b.x)*(v.a.y-v.b.y)-(u.a.y-u.b.y)*(v.a.x-v.b.x);
	double t;
	if(zero(un)){
		un = (u.a.y-u.b.y)*(v.a.z-v.b.z)-(u.a.z-u.b.z)*(v.a.y-v.b.y);
		if(zero(un)){
			un = (u.a.z-u.b.z)*(v.a.x-v.b.x)-(u.a.x-u.b.x)*(v.a.z-v.b.z);
			t = ((u.a.z-v.a.z)*(v.a.x-v.b.x)-(u.a.x-v.a.x)*(v.a.z-v.b.z))/un;
		}
		else
			t = ((u.a.y-v.a.y)*(v.a.z-v.b.z)-(u.a.z-v.a.z)*(v.a.y-v.b.y))/un;
	}
	else t = ((u.a.x-v.a.x)*(v.a.y-v.b.y)-(u.a.y-v.a.y)*(v.a.x-v.b.x))/un;
	//printf("t %.4f %.4f\n", un, t);
	ret.x += (u.b.x-u.a.x)*t;
	ret.y += (u.b.y-u.a.y)*t;
	ret.z += (u.b.z-u.a.z)*t;
	return ret;
}
int main(){
	double x, y, z;
	while(~scanf("%lf%lf%lf", &x, &y, &z)){
		point3 A = point3(x, y, z), B, C, D;
		B.sc(); C.sc(); D.sc();
		plane3 PA = plane3(B, C, D);
		plane3 PB = plane3(C, D, A);
		plane3 PC = plane3(D, A, B);
		plane3 PD = plane3(A, B, C);
		PA.get(); PB.get(); PC.get(); PD.get();

		double h = ptoplane(A, PA);
		double V = h * PA.s;
		if(zero(h)){
			printf("O O O O\n");
			continue;
		}
		double r = V / (PA.s+PB.s+PC.s+PD.s);

		//printf("%.4f %.4f %.4f\n", h, V, r);

		//PA.pr(); PB.pr(); PC.pr();
		plane3 X = move(PA, A, r);
		plane3 Y = move(PB, B, r);
		plane3 Z = move(PC, C, r);
		//X.pr(), Y.pr(), Z.pr();

		line3 L = intersection(X, Y);
		line3 J = intersection(Y, Z);

		point3 ans = gao(L, J);
		printf("%.4f %.4f %.4f %.4f\n", ans.x, ans.y, ans.z, r);
	}
}

